<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$ci = & get_instance(); 
	$match_id = $this->input->post('match_id',TRUE);
	$category_id = $this->input->post('category_id',TRUE);
	
	//$eventCategoryDataArray = $ci->event_category_entity->getArrayIdAndNameOfEventCategory($match_id);
	$EVENT_CATEGORY = $ci->event_category_entity->init('id',$category_id);	
	$MATCH = $ci->match_entity->init('id', $match_id);
	$TOURNAMENT = $ci->tournament_entity->init('id',$MATCH->getTournamentId());
?>

<form action="<?php echo site_url('admin/dataman/match/add_events_submit');?>" name="add_events_submit" id="add_events_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="match_id" id="match_id" value="<?php echo $match_id;?>" />
	<input type="hidden" name="category_id" id="category_id" value="<?php echo $category_id;?>" />
	
	<div class="grid6">
		<input type="button" class="button no-uniform" value="Add More" onclick="return add_more_event(<?php echo $category_id;?>,<?php echo $match_id;?>);"/> 
	</div>
	<div class="clrboth"></div>
	<br />
	<div class="clrboth"></div>
	<div id="addMore"></div>
	
	<div class="grid2"><span class="bold">Event Category:</span></div>
	<div class="grid6"><?php echo $EVENT_CATEGORY->getCategory(); ?></div>	
	<div class="clrboth"></div>
	
	<div class="grid2"><span class="bold">*Event Name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" name="name[]" value="" class="std-input"/></div>
	<div class="clrboth"></div>
	
	<div class="grid2"><span class="bold">*Odds:</span></div>
	<div class="grid6"><input type="text" maxlength="25" name="odds[]" value="" class="std-input"/></div>
	<div class="clrboth"></div>
<!--	
	<div class="grid2"><span class="bold">*Start time:</span></div>
	<div class="grid6"><input type="text" maxlength="255" name="start_time[]" value="<?php echo sysDateTimeFormat($MATCH->getStartTime());?>" class="std-input"/>
		<br/> <i>&nbsp; >= <?php echo sysDateTimeFormat($MATCH->getStartTime());?></i>
	</div>
	<div class="clrboth"></div>
	
	<div class="grid2"><span class="bold">*End time:</span></div>
	<div class="grid6"><input type="text" maxlength="255" name="end_time[]" value="<?php echo sysDateTimeFormat($TOURNAMENT->getEndTime());?>" class="std-input"/>
		<br/> <i>&nbsp; <= <?php echo sysDateTimeFormat($TOURNAMENT->getEndTime());?></i>
	</div>
	<div class="clrboth"></div>
-->	
	<div class="grid2">&nbsp;</div>
	<div class="grid6">
		<input type="submit" class="button" /> 
		&nbsp;
		<?php echo loader_image('id="loader_image" class="hidden"');?>
	</div>
	<div class="clrboth"></div>	
	
</form>
